package com.dhecp.project.storage.mapper;

import java.util.List;
import java.util.Map;

import com.dhecp.project.storage.domain.HwReconcileSon;
import org.apache.ibatis.annotations.Param;

import com.dhecp.core.genericDao.GenericDao;
import com.dhecp.project.storage.domain.DeliveryLogistics;

/**
 * DAO
 * @author Jason
 */
public interface DeliveryLogisticsMapper extends GenericDao<DeliveryLogistics, String>  {

	/**
     * 查询实体
     * @author Jason
	 */
	List<DeliveryLogistics> select(Map<String, Object> params);

	/**
     * 查询实体
     * @author Jason
	 */
	DeliveryLogistics findByBid(String bid);
	
	/**
	 * 查询运输中的
	 * @param productCode
	 * @param warehouse
	 * @return
	 */
	List<DeliveryLogistics> listProcessByProductCodeAndWarehouse(@Param("productCode")String productCode, @Param("warehouse")String warehouse);

	/**
	 * 新增实体
	 * @author Jason
	 */
	int insertDeliveryLogistics(DeliveryLogistics entity);

	/**
	 *@Description: 修改状态
	 */
	int updateState(@Param("bid")String bid, @Param("stateName")String stateName);
    /**
     *@Description: 修改数据
     */
	int updateStateAndOverseasStockInNo(@Param("bid")String bid, @Param("stateName")String stateName, @Param("overseasStockInNo")String overseasStockInNo);

	/**
	 *@Description: 修改入库状态
	 */
	int updateStateRk(@Param("bid")String bid, @Param("stateRkName")String stateRkName);

	/**
	 *@Description: 修改状态
	 */
	int updateWayBillNumber(@Param("bid")String bid, @Param("wayBillNumber")String wayBillNumber, @Param("stateName")String stateName);

	/**
	 *@Description: 修改预计到货时间
	 */
	int updateTimeArrivePredict(@Param("bid")String bid, @Param("timeArrivePredict")String timeArrivePredict);

	/**
	 * 通过bid删除
	 * @author Jason
	 */
	int deleteByBid(@Param("bid")String bid);

	/**
	 * 按照月份查询已入库的数据
	 * @return
	 */
	List<HwReconcileSon> listDateAndOverseasName(@Param("year")String year,@Param("mouth")String mouth, @Param("overseasName")String overseasName);

}
